package com.kcyu.sfhinvoice.service.impl;

import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.http.HttpUtil;
import com.kcyu.sfhinvoice.domain.User;
import com.kcyu.sfhinvoice.service.NotificationService;
import org.springframework.stereotype.Service;

@Service
public class NotificationServiceImpl implements NotificationService {
    @Override
    public boolean loginNotice() {
        int loginIdAsInt = StpUtil.getLoginIdAsInt();
        User user = new User().selectById(loginIdAsInt);
        HttpUtil.get("https://api.day.app/qaeErvUbfza4SWtXWc7PeU/发票系统登录提醒/" + user.getUsername() + "登录了系统");
        return true;
    }
}
